UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'exXCw/IWEMZguT2QCrTRk0hrcg1IEDJJUUEm8eue0iA='
WHERE
key_id = 'ac26d8152479c55f3f6a8f35fca00438a8ec7dfef345b9da4e1135a88eac4215'
AND (
token = 'exXCw/IWEMZguT2QCrTRk0hrcg1IEDJJUUEm8eue0iA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)