UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'YdUlcZA7Z5KaxOfgmJXCvM/JFCHAJXlCHvgoHwRkDGg='
WHERE
key_id = '96cff2c1a4533baf74a6db0940b6093c23fb8d81b3422cf5af34591cd54caffd'
AND (
token = 'YdUlcZA7Z5KaxOfgmJXCvM/JFCHAJXlCHvgoHwRkDGg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)