UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'DZ0wXRG5ka9cm47fxLAv5UmgDCC53jGxLHPFMLJo9UE='
WHERE
key_id = '0443bd5624eb5fe241d2d05976ff4962daf06c2c34f7c9fe3b2c5c497eb3bf16'
AND (
token = 'DZ0wXRG5ka9cm47fxLAv5UmgDCC53jGxLHPFMLJo9UE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)