UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'no6mQyHzyBXhcHqzx17CfPcPTJgyaoQPq+4qqJEwXog=' 
WHERE 
  key_id = '0606257573a33cd69380354fa18afceeb427f0ff9d11c86a35616db851a391f2' 
  AND (
    token = 'no6mQyHzyBXhcHqzx17CfPcPTJgyaoQPq+4qqJEwXog=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00024