UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'V+UjF42CoHwoFabG6v9I5zgcBh9ld/DKpqdsI6PUezY='
WHERE
key_id = '19f379fedbe9401dc91c0790529e27b12406742d25192e2d223f2ed832b6f75c'
AND (
token = 'V+UjF42CoHwoFabG6v9I5zgcBh9ld/DKpqdsI6PUezY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)