UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'YzUmBTr2Rtj6uOgRgRBSUBingj/Pe9X00ekDqdjHZr0=' 
WHERE 
  key_id = 'ff73a97eab1b7432fae07acaf484cb5d1ba69a45c0dee086c46b23703f0b84af' 
  AND (
    token = 'YzUmBTr2Rtj6uOgRgRBSUBingj/Pe9X00ekDqdjHZr0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00024