UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+HZJmaNo92twL4Z/Ptr8fkByUSl4bU/BYFP900naNIc='
WHERE
key_id = 'f1267edb36fbf454975da2b5a360d5e98c3fae0134bd85105e4bbe484bcceb7e'
AND (
token = '+HZJmaNo92twL4Z/Ptr8fkByUSl4bU/BYFP900naNIc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)