UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'aPGXw/jvp8T1faQ8MNNKrB3xnRZKWJrb0FYNSLaEMQ0=' 
WHERE 
  key_id = '92461d254639a3187cba7a1ea262e9471d4bf00978195e5b89fc97d516016cfb' 
  AND (
    token = 'aPGXw/jvp8T1faQ8MNNKrB3xnRZKWJrb0FYNSLaEMQ0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00019