UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MMv1ZAwObrvddM+scmo5eCJ+tZb3Q+Xt6PCtCVMlkmc='
WHERE
key_id = 'fb038c81ca5f179a84a8127f1d092a4c86bb9245961d5a340f0b1a82330c4d00'
AND (
token = 'MMv1ZAwObrvddM+scmo5eCJ+tZb3Q+Xt6PCtCVMlkmc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)