UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'k0DyqtyOIuQfj5EBmYW9+L7eII1ef/3rQDrYoI/C8ko='
WHERE
key_id = '37129e37c3a58f32d2c37984f7b974967fba0043e8ed98c3d1a126910d03b07f'
AND (
token = 'k0DyqtyOIuQfj5EBmYW9+L7eII1ef/3rQDrYoI/C8ko='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)