UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GKpdbUSkwhv8xdasepP0zjH6UupSfstHNoTmXo5+dzA='
WHERE
key_id = '190af40b097d1685f70292a4817945beabf5a3dfc4a1d1093edd60ac78978b9e'
AND (
token = 'GKpdbUSkwhv8xdasepP0zjH6UupSfstHNoTmXo5+dzA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)