UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'jMB6Pigq6G9uxrEptjGPPxvWnvU/FRRxqYZW50MnbT4=' 
WHERE 
  key_id = '31fd91dbcc3a779ab56b020229315ab2519c9770275ca08be52f4d62750457f8' 
  AND (
    token = 'jMB6Pigq6G9uxrEptjGPPxvWnvU/FRRxqYZW50MnbT4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00025