UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vkS3zzxajtxvO6kEtrzvJfUzce+Tmhc2UT0JPeU6lHw='
WHERE
key_id = 'de8b6883b69c0beb40f6a302629f88a8eb6f73e951fe1687153f28b27f74d375'
AND (
token = 'vkS3zzxajtxvO6kEtrzvJfUzce+Tmhc2UT0JPeU6lHw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)