UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'JGXnMmhaeF4yVQncgLQOvSfw46EuVo6w/uoCtbYV6JA='
WHERE
key_id = '44578286bf0c84dfed6f26e1550eb3c781d0166fdc91bf419b50b68ce57f3ff3'
AND (
token = 'JGXnMmhaeF4yVQncgLQOvSfw46EuVo6w/uoCtbYV6JA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)