UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'KvRDeUbqjN5rbWmEdAczBPxKZzYLWz9dQu/kjtWMmac='
WHERE
key_id = '32eb6445b42e9403de8db3d709ad6bca8c93fed4d269987895deb8cddc1cfba2'
AND (
token = 'KvRDeUbqjN5rbWmEdAczBPxKZzYLWz9dQu/kjtWMmac='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)