UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'UVkbp0kif11Yo8EoRThCcnc5EvJDyBaq8MG3lHpjJAM='
WHERE
key_id = 'e23a4029241ad3f2d42f48bcf4f7c8527353afb1b3a046a2bf0e600df33c26cf'
AND (
token = 'UVkbp0kif11Yo8EoRThCcnc5EvJDyBaq8MG3lHpjJAM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)