UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '9/DxNEmN3XSgcqoG66cpXHKvuS0MC05fbuOwj6pRGyM=' 
WHERE 
  key_id = 'eee58ee6e193d0560975fdf47fc41f907f253ff4ce6d1b7c63c43f7758dcce92' 
  AND (
    token = '9/DxNEmN3XSgcqoG66cpXHKvuS0MC05fbuOwj6pRGyM=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00023