UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'uxK6V9jm9v4MhRy+Vz2s0zWbKE9CUnIkVCaKEetYGjc='
WHERE
key_id = '3cdd82c61ee6bc23a77fb1c6b47b712beda49e0068cb6203c86997b74dc7f9e9'
AND (
token = 'uxK6V9jm9v4MhRy+Vz2s0zWbKE9CUnIkVCaKEetYGjc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)