UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/1ELR9RAwfHsaHvRMFOXG/tcUa6Pfrf9yxXPcCx770c='
WHERE
key_id = '6192de76555eb78a4e1dd765b4145eefaa8a75c4373922b16fb6217b34520933'
AND (
token = '/1ELR9RAwfHsaHvRMFOXG/tcUa6Pfrf9yxXPcCx770c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)