UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+8a5u5lJa5l7ExkoLZQg3k4AEFoZZ875uC2HS3L2g60='
WHERE
key_id = '1a66233349109bae8a520007183e08cb4036c315c86304eb56c248f3160cbc42'
AND (
token = '+8a5u5lJa5l7ExkoLZQg3k4AEFoZZ875uC2HS3L2g60='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)