UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '0g21FasVENH2t4o/or1s9u5kEo8/DkbeS/9tjTEU3po=' 
WHERE 
  key_id = '73127eae9f8c1c81d1e8324f23b3df1720425d5b87b34e02a0ac8cda450544ec' 
  AND (
    token = '0g21FasVENH2t4o/or1s9u5kEo8/DkbeS/9tjTEU3po=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00044