UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '6+PxYDNiQMynOW7pP+A/E4fpK7uddtjE1LY7fjBssZY='
WHERE
key_id = '4e4cebc12f3fa279fae0af7c27ab6a87f22549f165dfc54241cfd6cae9a04db8'
AND (
token = '6+PxYDNiQMynOW7pP+A/E4fpK7uddtjE1LY7fjBssZY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)