UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'ohxsa/cYmq3qBLpBTOH0zzae5/fk0YdiOBpWvnxIimo=' 
WHERE 
  key_id = 'e3f24c30601e2999fb50fe0ef68c7d7f8d20b359feb66ba3e0483c7a7c6d53da' 
  AND (
    token = 'ohxsa/cYmq3qBLpBTOH0zzae5/fk0YdiOBpWvnxIimo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00044