UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FmB3PS1lHGS0Nx37Voy+vyHrjD1kedSzN+ZszkQjcnM='
WHERE
key_id = '67ff4278be3256f5606e4ccd8b419c9c91a23c5bf36c2c0c96f1bfcffd92fc60'
AND (
token = 'FmB3PS1lHGS0Nx37Voy+vyHrjD1kedSzN+ZszkQjcnM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)