UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Ecbir3uWP/1XYynaC15PA1sNO/TYDaO/p3FRKSIJzKA='
WHERE
key_id = '3ee055ae31f97450583a49dc9527ba4ae8303e87e02af99f7d984692ddab932d'
AND (
token = 'Ecbir3uWP/1XYynaC15PA1sNO/TYDaO/p3FRKSIJzKA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)