UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'KWLb0n5grNEUF9WUF+sHrbL56f8IVxnrZ/uX2cR5rl0=' 
WHERE 
  key_id = 'ae544c95426be27397230acbd521fa0932e3076d61314ea116f063133fdccc33' 
  AND (
    token = 'KWLb0n5grNEUF9WUF+sHrbL56f8IVxnrZ/uX2cR5rl0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00018