UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'iqucAfXrOONp7YwhJyKlkM/ZMAL30glomQY0H73AJTM='
WHERE
key_id = '3714e51200d6c1ddd8313c0b7fedc37911a92d709b3d1ee7a6c0f244cf3d613d'
AND (
token = 'iqucAfXrOONp7YwhJyKlkM/ZMAL30glomQY0H73AJTM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)