UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'IOoF7ofpJIjcAuHgtYc280lSwJGTvPD1GU2+HCAbTKc=' 
WHERE 
  key_id = '2096175f827f07f58386b51411cacfd8da4b8a6badb87dee8cb0503344ef4a95' 
  AND (
    token = 'IOoF7ofpJIjcAuHgtYc280lSwJGTvPD1GU2+HCAbTKc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00044