UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zadlC/Cc9dYaDS6LPf3Gmj1XwuSFnsnR+9LsFk11sB0='
WHERE
key_id = '16fb9815ea4116b1d7785ff0bfbfce037d323f6e80938c14a7d91f9a7d779438'
AND (
token = 'zadlC/Cc9dYaDS6LPf3Gmj1XwuSFnsnR+9LsFk11sB0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)