UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'RhfKO+zHkBjFFAkA25q8jTHm5wlO5zV8sDfJvXlPWMw='
WHERE
key_id = '73f3d2a635cb021d33549e8917b21f4152cebe1f9b9f7fa1c227e2d6f4f03c5f'
AND (
token = 'RhfKO+zHkBjFFAkA25q8jTHm5wlO5zV8sDfJvXlPWMw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)