UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FIXcbgQu8mc+1tizAYNXiTYRpXWosfrOIIrai4wPB2Y='
WHERE
key_id = '9fe0f87f8e46d85d914eff08496d6a11c5b54afb06cca55e7f4f4afdd891c1de'
AND (
token = 'FIXcbgQu8mc+1tizAYNXiTYRpXWosfrOIIrai4wPB2Y='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)