UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'l0Eg0py+0e3ioyCvXiCrSgz+HgK4S9zgPgxDdiy5HiI='
WHERE
key_id = '4adb2cbd52540115d9f62cc88b462da693bf57d2f153cec0f4309ddd6274c6a9'
AND (
token = 'l0Eg0py+0e3ioyCvXiCrSgz+HgK4S9zgPgxDdiy5HiI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)