UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1Vr/e+krExCN6Zv1UhP3YOa5KKo6bDH9r+emxfdk84k='
WHERE
key_id = '985caa21f0136335e7a6c10dee285158a0ba8558a243977a89d9df71e2d1f288'
AND (
token = '1Vr/e+krExCN6Zv1UhP3YOa5KKo6bDH9r+emxfdk84k='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)