UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'EKg3MkFY+t5S6OzDe176OwIUItIRI1GMJWvhX0s3fjI='
WHERE
key_id = '81cc212886ccbfa95f6c67dfeeacc233ccbc3bd013c9b0a29bd9a83a991519bc'
AND (
token = 'EKg3MkFY+t5S6OzDe176OwIUItIRI1GMJWvhX0s3fjI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)