UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'wox4X4hOyBgIGIHfdJMpSapOzzS9QQEz/JJMPXlL7J0=' 
WHERE 
  key_id = 'b6fde3aeadc484b5701bda54a23a57e7e68271823d5db82f56330a92df160a5c' 
  AND (
    token = 'wox4X4hOyBgIGIHfdJMpSapOzzS9QQEz/JJMPXlL7J0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00023