UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'F6Z1DPKixTm2SNzqvXLmPcSYLr7CVGHAbpa6InDv6Ic='
WHERE
key_id = '458d47cfae0cee94824fbd0b441ad0c7822c55ec46bb2990e268327d4cb9ce72'
AND (
token = 'F6Z1DPKixTm2SNzqvXLmPcSYLr7CVGHAbpa6InDv6Ic='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)