UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'VJK8UR0gndqFoebrD0/Fo+ZzYgWg5Tw9WHJpAC5Pls8='
WHERE
key_id = '182caf843bdc004ccf4db41cbdeab4baaa738357fca9ca0260ec4b22bb3b268f'
AND (
token = 'VJK8UR0gndqFoebrD0/Fo+ZzYgWg5Tw9WHJpAC5Pls8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)