UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FNKrfRgIHT4zn4o/XVF1S2VOXKrP/N9zL3F5jrUyUAI='
WHERE
key_id = '834703dad0566fe37638a6c77c0c1a2b06ad76785c7c34e464c5aedafeadb600'
AND (
token = 'FNKrfRgIHT4zn4o/XVF1S2VOXKrP/N9zL3F5jrUyUAI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)