UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'TV+Ow8AK62VKlAqgnn3UbwHzuf2bju/N4Uc2CMdDua8='
WHERE
key_id = 'dfd305f9ba073d18a56075fd45fa748ea98db9d85e53799b7cb545ae80e0c005'
AND (
token = 'TV+Ow8AK62VKlAqgnn3UbwHzuf2bju/N4Uc2CMdDua8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)