UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'U+v2m+dITOP0AG3ytsGaYhLM7GNv1mY6NcttbNLOl6w=' 
WHERE 
  key_id = '9963e927ae0ad2e9f1d322c6d710c39f73cb8af1f589ec8e38aae712b33a106b' 
  AND (
    token = 'U+v2m+dITOP0AG3ytsGaYhLM7GNv1mY6NcttbNLOl6w=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00033