UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '2CUBALVdQ/oWI3qenhQ1t9RP7weJr/+3v06Leq7JlM4=' 
WHERE 
  key_id = 'c4d88426dc0439529d816868b6d1e1fa7e06d5e2506a81e359393e924eb2c724' 
  AND (
    token = '2CUBALVdQ/oWI3qenhQ1t9RP7weJr/+3v06Leq7JlM4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00054