UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'AcLJow0iAyw+gkRlcKvLKtVzS8wMbASx724f2ihRtaA=' 
WHERE 
  key_id = '48504571809da64e2a4e697310f677ae12b127d500ad0d73994fdf259b9dcaed' 
  AND (
    token = 'AcLJow0iAyw+gkRlcKvLKtVzS8wMbASx724f2ihRtaA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00044