UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/6LtdGyN/ponKUczrDa7di1d+UWWuVSgShbq7XYjeJ8='
WHERE
key_id = '7a8b463af5b30e527fae5aa7ffe1e1291e36af44a23396236a6f50827bea6b92'
AND (
token = '/6LtdGyN/ponKUczrDa7di1d+UWWuVSgShbq7XYjeJ8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)